import Mock from 'mockjs'

const random = Mock.Random

const config = {
	getCommunicationList: ({ params: { currentPage, pageSize } }) => {
		const params = {
			currentPage,
			pageSize,
			totalCount: 800,
			totalPage: parseInt(800 / pageSize),
			list: Array.from({ length: pageSize }).map(() => ({
				askAccount: random.name(),
				askName: random.cname(),
				createTime: random.date(),
				createUser: random.cname(),
				description: random.csentence(10, 50),
				replyPerson: random.cname(),
				replyTime: random.date(),
				id: random.natural(),
			})),
		}
		return params
	},
}

export default config
